<!--
 * @Author: qianl
 * @Date: 2024-01-26 16:05:55
 * @LastEditors: qianl
 * @LastEditTime: 2024-01-29 17:03:37
 * @FilePath: \internal-website-jxg\src\views\Home\module\newsCenter.vue
 * 
-->
<template>
<div class="container">
  <homeCard @goMore="goMore">
    <span slot="title">
      <!-- <i class="iconfont icon-w_xinwen home-card-title-i"></i> -->
      <img class="imgClass" src="" />
      <span class="home-card-title">新闻中心</span>
    </span>
    <newsItem class="newsItem" :params="item" v-for="(item,index) in tableData" :key="index"></newsItem>
  </homeCard>
</div>
</template>

<script>
import homeCard from "@/views/Home/module/homeCard";
import newsItem from "@/views/Home/module/newsItem";
export default {
  name: "newsCenter",
  components:{
    homeCard,
    newsItem
  },
  data(){
    return {
      tableData:[],
    }
  },
  mounted() {
    this.newQuery()
  },
  methods:{
    goMore(){
      this.$router.push({name:'newsList',query:{columnId:8,}})
    },
    newQuery(){
      let params = {
        col:8,
        "page": 0,
        "pageSize": 3
      }
      this.$api.paginHome(params).then(res=>{
        console.log(res.data.data)
        this.tableData = res.data.data
      })
    },
  },
}
</script>

<style scoped lang="less">
.container{
  width: 44.7rem;
  height: 43.3rem;
  // height: 33.3rem;
  .newsItem{
    margin-bottom: 3.2rem;
    // margin-bottom: 1.2rem;
  }
}
.imgClass{
  height: 2rem;
  margin-right: 1rem;
}
</style>